package com.kunzai.threadrun2.numberone;

import java.util.concurrent.FutureTask;

public class TestThread {
    public static void main(String[] args) throws Exception {
        TrainCall trainCall = new TrainCall();
        FutureTask futureTask = new FutureTask<Integer>(trainCall);
        Thread thread = new Thread(futureTask);
        thread.start();
        Integer number = (Integer) futureTask.get();
        System.out.println(number);

        /**
         * 阻塞队列
         * volite 关键字
         * 线程池
         *
         * 并发工具类
         *
         *
         */
    }
}
